<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Sqlserver\V20180328\Models;
use TencentCloud\Common\AbstractModel;

/**
 * DescribeUpgradeInstanceCheck response structure.
 *
 * @method integer getIsAffect() Obtain Whether the configuration adjustment has an impact on the instance. 0 - no; 1 - yes.
 * @method void setIsAffect(integer $IsAffect) Set Whether the configuration adjustment has an impact on the instance. 0 - no; 1 - yes.
 * @method integer getPassed() Obtain Whether the configuration adjustment can be executed. 0 - no; 1 - yes.
 * @method void setPassed(integer $Passed) Set Whether the configuration adjustment can be executed. 0 - no; 1 - yes.
 * @method string getModifyMode() Obtain Whether the configuration adjustment is a downgrade or an upgrade. Down - downgrade; up - upgrade.
 * @method void setModifyMode(string $ModifyMode) Set Whether the configuration adjustment is a downgrade or an upgrade. Down - downgrade; up - upgrade.
 * @method array getCheckItems() Obtain Check item list.
 * @method void setCheckItems(array $CheckItems) Set Check item list.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class DescribeUpgradeInstanceCheckResponse extends AbstractModel
{
    /**
     * @var integer Whether the configuration adjustment has an impact on the instance. 0 - no; 1 - yes.
     */
    public $IsAffect;

    /**
     * @var integer Whether the configuration adjustment can be executed. 0 - no; 1 - yes.
     */
    public $Passed;

    /**
     * @var string Whether the configuration adjustment is a downgrade or an upgrade. Down - downgrade; up - upgrade.
     */
    public $ModifyMode;

    /**
     * @var array Check item list.
     */
    public $CheckItems;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param integer $IsAffect Whether the configuration adjustment has an impact on the instance. 0 - no; 1 - yes.
     * @param integer $Passed Whether the configuration adjustment can be executed. 0 - no; 1 - yes.
     * @param string $ModifyMode Whether the configuration adjustment is a downgrade or an upgrade. Down - downgrade; up - upgrade.
     * @param array $CheckItems Check item list.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("IsAffect",$param) and $param["IsAffect"] !== null) {
            $this->IsAffect = $param["IsAffect"];
        }

        if (array_key_exists("Passed",$param) and $param["Passed"] !== null) {
            $this->Passed = $param["Passed"];
        }

        if (array_key_exists("ModifyMode",$param) and $param["ModifyMode"] !== null) {
            $this->ModifyMode = $param["ModifyMode"];
        }

        if (array_key_exists("CheckItems",$param) and $param["CheckItems"] !== null) {
            $this->CheckItems = [];
            foreach ($param["CheckItems"] as $key => $value){
                $obj = new CheckItem();
                $obj->deserialize($value);
                array_push($this->CheckItems, $obj);
            }
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
